const { defineConfig } = require("@vue/cli-service");
const webpack = require("webpack");
module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack: (config) => {
    config.plugin("html").tap((args) => {
      args[0].title = "自定义组件库";
      return args;
    });
    // quill 富文本组件 图片调整大小
    config.plugin("provide").use(webpack.ProvidePlugin, [
      {
        "window.Quill": "quill/dist/quill.js",
        Quill: "quill/dist/quill.js",
      },
    ]);
  },

  devServer: {
    proxy: {
      "/": {
        target: "http://localhost:5000",
        ws: false, //用于支持websocket
        changeOrigin: true,
        pathRewrite:{
          '^/':''
        }
      },
    },
  },
});
